package com.yubest.dynamicdatasource.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.yubest.dynamicdatasource.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@DS("master")
@Service
public class UserInfoService1Impl implements UserInfoService {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    public List<Map<String, Object>> getAll() {
        return jdbcTemplate.queryForList("select * from t_user_info");
    }
}
